<template>
    <div class="article_details">
        <van-nav-bar  title="寻师问法" left-text="返回" right-text="" left-arrow @click-left="onClickLeft"  class="fixed"/>
        <div class="article-details-cont mt46">
            <div class="seek_master_details_title">
                <i class="iconfont icon-wentidaan-"></i>
                {{ title }}
            </div>
            <div class="seek_master_details_cont">
                <i class="iconfont icon-wentidaan-1"></i>
                <div class="article-details-info" v-html="content"> </div>
            </div>
            
        </div>
    </div>
</template>
<script>
import {getResponse, getResponses} from "../api"

export default {
    data(){
        return {
            img:'',
            title:'',
            content:''
        }
    },
    
    methods:{
        onClickLeft() {
            this.$router.go(-1)
        },

        //寺庙列表
        async articleDetails(id) {	
            const data = await getResponses(`/fochina/query/articledetail/json`,{'articleid':id})
            
            
            if(data.code === '0000') {
               let idata = data.data

               this.img = idata.showpicture
               this.title = idata.title
               this.content = idata.content
            } else {
                console.log(data.error)
            }
        }
    },

    mounted(){
        this.articleDetails(this.$route.query.id)
    }
}
</script>
<style scoped>

.seek_master_details_cont {
    display: flex;
}

.seek_master_details_title {
    color: #823117;
    font-size:0.32rem;
    display: flex;
    font-family: PingFangSC-Medium;
    align-items: center;
    margin-bottom:0.32rem;
}

.seek_master_details_title i {
    font-size:0.5rem;
    margin-right: 0.18rem;
}

.seek_master_details_cont i {
    color: #AB946C;
    font-size:0.52rem;
    margin-right: 0.18rem;
}

.article_details {
    background-color:#fff;
    padding-bottom:0.2rem;
}

.article-details-info {
    font-family: PingFangSC-Regular;
    font-size: 0.28rem;
    color: #000000;
    text-align: justify;
    line-height: 0.4rem;
    text-indent:0.48rem;
    flex:1
}

.article-details-info img{
    max-width:3.6rem;
    height: auto;
    margin-bottom: 0.1rem;
}

.article-details-img {
    width:6.9rem;
    height: 4.26rem;
    background-color:#39a9ed;
    margin-bottom:0.2rem;
}

.article-details-img img {
    width:100%;
    height: 100%;
}

.article-details-cont {
    padding:0.2rem 0.3rem 0;
}

</style>
